#pragma once

template <typename T>
class Singleton
{
private:
    static T*   pInstance;
public:
    static T*   getInstance()
    {
        if( pInstance == NULL )
            pInstance = new T;

        return pInstance;
    }
    void        release()
    {
        if( pInstance )
        {
            delete pInstance;
            pInstance = NULL;
        }
    }
};
